﻿using System.Collections.Generic;
using TaleWorlds.CampaignSystem;
using TaleWorlds.SaveSystem;
namespace MarriageFertility.DataType;

public class CustomerPregnancy
{
    [SaveableField(1)] public readonly Hero Mother;
    [SaveableField(2)] public readonly Hero Father;
    [SaveableField(3)] public readonly CampaignTime DueDate;

    public CustomerPregnancy(Hero pregnantHero, Hero father, CampaignTime dueDate)
    {
        Mother = pregnantHero;
        Father = father;
        DueDate = dueDate;
    }

    internal static void AutoGeneratedStaticCollectObjectsPregnancy(
        object o,
        List<object> collectedObjects)
    {
        ((CustomerPregnancy)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
        collectedObjects.Add(Mother);
        collectedObjects.Add(Father);
        CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime(this.DueDate, collectedObjects);
    }

    internal static object AutoGeneratedGetMemberValueMother(object o) =>
        ((CustomerPregnancy)o).Mother;

    internal static object AutoGeneratedGetMemberValueFather(object o) =>
        ((CustomerPregnancy)o).Father;

    internal static object AutoGeneratedGetMemberValueDueDate(object o) =>
        ((CustomerPregnancy)o).DueDate;
}